//
//  JSTServer.h
//  JSTMobClick
//
//  Created by Czj on 16/8/28.
//  Copyright © 2016年 Czj. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "JSTHttpClient.h"
typedef void(^JSTAlertBlock)();
@interface JSTServer : NSObject

//请求广告数据
+ (void) requestAdvert:(NSString *)advertId
               dataDic:(void (^)(NSDictionary *dataDic))dataDic
              errorStr:(void (^)(NSString *error, NSInteger status))errorStr;

//上传统计数据
+ (void) requestPostStatisticsData:(NSDictionary *)dict
                     postInterface:(NSString *)postUrl
                           dataDic:(void (^)(NSDictionary *dataDic))dataDic
                          errorStr:(void (^)(NSString *error))errorStr;

//推送数据请求
+ (void) requestNotification:(void (^)(NSDictionary *notifiData))notifiDic;

//通过IP获取地址请求
+ (void) requestAddressData:(void (^)(NSDictionary *addressData))addressDic;

//版本控制请求
+ (void) requestVersionControlData:(void (^)(NSDictionary *versionData))versionDic err:(void (^)(NSString *errStr))errStr;

//推送到达率
+ (void) requestPushArrivalRateData:(NSString *)pushId push:(void (^)(NSDictionary *pushArrivalRateData)) pushArrivalRateData;

//过滤回调接口
+ (void) requestBackFilteredData:(void (^)(NSDictionary *backFilteredData))backFilteredDic err:(void (^)(NSString *errStr))errStr;

//上传广告悬停时间
+ (void) postAdvertMonitorStopTime:(NSDictionary *)stopTimeData success:(void(^)(NSDictionary *successDic))success err:(void(^)(NSString *errStr))errStr;

//APP安装量接口
+ (void) postAPPInstallDataSuccess:(void(^)(NSDictionary *successDic))success err:(void(^)(NSString *errStr))errStr;

//获取广告样式
+ (void) requestAdvertStyleData:(NSString *)advertId Success:(void(^)(NSDictionary *successDic))success err:(void(^)(NSString *errStr))errStr;

//新的配置接口
+ (void) requestAPPInfoDataSuccess:(void(^)(NSDictionary *successDic))success err:(void(^)(NSString *errStr))errStr;

//cps统计接口
+ (void) requestCPSInfoDataWithDict:(NSDictionary *)dic Success:(void(^)(NSDictionary *successDic))success err:(void(^)(NSString *errStr))errStr;

+ (void)showAlertWithTitle:(NSString *)titleStr withDetailStr:(NSString *)detailStr andConfirmAction:(JSTAlertBlock)alertBlock;
@end
